package contoller

import (
	"github.com/gin-gonic/gin"
	"go-doc/internal/dto"
	"net/http"
)

type authCtl struct{}

var AuthCtl = new(authCtl)

func (c *authCtl) Login(ctx *gin.Context) {
	var req dto.LoginReq
	if err := ctx.ShouldBind(req); err != nil {
		ctx.JSON(http.StatusOK, gin.H{"code": -1, "message": err.Error()})
		return
	}
	ctx.JSON(http.StatusOK, gin.H{"msg": "pong"})
}

func (c *authCtl) Logout(ctx *gin.Context) {
	ctx.JSON(http.StatusOK, gin.H{"msg": "pong"})
}
